home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
prog
/
tpex.arj
/
C7REVEX4.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-09-04
|
921b
|
35 lines
{
Programming in Turbo Pascal 6.0.
Turbo Pascal By Example By Greg Perry.
Chapter 7 Review exercise #4.
Robert E. Wade 9-4-93
}
PROGRAM C7RevEx4;
USES Crt;
CONST Spc = ' ';
RegPay = 4.50;
TimeAndHalf = RegPay * 1.5;
DoubleTime = RegPay * 2;
TaxRate = 0.28;
RegHours = 40;
TaHHours = 5;
DblTimeHrs = 5;
{ Define Constants that perform the calculations }
GrossPay = (RegPay * RegHours) + (TimeAndHalf * TaHHours) +(DoubleTime * DblTimeHrs);
Taxes = GrossPay * TaxRate;
NetPay = GrossPay - Taxes;
BEGIN
CLRSCR;
{ Display data to screen }
WRITELN( 'Gross Pay is: ', GrossPay:8:2 );
WRITELN( 'Taxes are: ', Spc:2, Taxes:8:2 );
WRITELN( 'Net Pay is: ', Spc:2, NetPay:8:2 );
END.